
# coding: utf-8

# In[58]:

import pandas as pd


# In[59]:

def conver1(val1,val2):
    df1=pd.read_excel(val1)
    df2=df1.iloc[:,[1,6,7,8,9,10]]
    df2.to_csv(val2)


# In[60]:

import os


# In[61]:

dir='e://123//'


# In[69]:

for root ,dirs,files in os.walk(dir):
    for name in files:
        #print (root)
        #print (dirs)
        #print (files)
        str1=os.path.join(root, name)
        #print (str1)
        str2=str1.replace('.xlsx','.csv')
        str2=str2.replace(' ','')
        #print (str2)
        str3='''"C:\Program Files (x86)\Anaconda32\python.exe" C:/Users/yunwei/PycharmProjects/pyrepo1/corp_sr/line/gps_check/rd_check.py  '''+ str2
        str3= str3 + ''' >> e:/123/res.txt'''
        print (str3)
        conver1(str1,str2)
        


# In[ ]:



